<%@ page import="sun.applet.Main" %><%--
  Created by IntelliJ IDEA.
  User: FeiFei
  Date: 2023/8/14
  Time: 15:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--jsp之script--%>
<%
    //相当于写在service方法内部
//    for (int i = 1; i <= 10; i++) {
//        System.out.println(i);
//        response.getWriter().println(i);
//    }

    //打印99乘法表
    for (int i = 1; i <= 9; i++) {
        for (int j = 1; j <= i; j++) {
            int num = j * i;
            response.getWriter().print(j + "*" + i + "=" + num + "  ");
        }
        out.println("<br>");
    }
%>
<%--jsp脚本对应的表达式 数值表达式--%>
<%=3 > 4 ? true : false

%>
<%--jsp脚本之声明  定义变量/定义方法--%>
<%!
    public void sum (int n){
        for (int i = 0; i < n; i++) {
            System.out.println(i);
        }
    }
%>
</body>
</html>
